//
//  SFPlayerRequestManager.h
//  Test
//
//  Created by xueshan1 on 2018/11/15.
//  Copyright © 2018年 xueshan1. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SFFileHandle.h"

@protocol SFPlayerRequestDelegate <NSObject>

- (void)sessionRequestDidReceiveData:(NSData *)data;

- (void)sessionRequestDidFinishLoadingWithCache:(BOOL)cache;

@end

NS_ASSUME_NONNULL_BEGIN

@interface SFPlayerRequestManager : NSObject

@property(nonatomic,weak)id<SFPlayerRequestDelegate>delegate;
@property(nonatomic,copy)NSString *requestURL;
@property(nonatomic,assign)NSUInteger requestOffset;//请求起始位置

@property(nonatomic,assign)NSUInteger fileLength;
@property(nonatomic,assign)NSUInteger cacheLength;
@property(nonatomic,assign)BOOL cache;
@property(nonatomic,assign)BOOL cancel;

- (instancetype)initWithRequestUrl:(NSString *)requestUrl;
- (void)startRequest;

@end

NS_ASSUME_NONNULL_END
